home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 4_0 / GNUUCP_2 / SOURCE / INCLUDES.H < prev    next >
Text File  |  1990-06-02  |  5KB  |  245 lines

  1. /*
  2.  * @(#)includes.h 1.7 87/09/29    Copyright 1987 Free Software Foundation, Inc.
  3.  *
  4.  * Copying and use of this program are controlled by the terms of the
  5.  * GNU Emacs General Public License.
  6.  *
  7.  * Include files for various supported systems:
  8.  * Note that NAMESIZE should be the max length of a file name, including
  9.  * all its directories, drive specifiers, extensions, and the like.
  10.  * E.g. on a Unix with 14-char file names, NAMESIZE is several hundred
  11.  * characters, since the 14-char names can be nested.
  12.  */
  13.  
  14. #define MAC
  15. #ifdef BSD
  16. /* Unix Berserkeley systems */
  17. #include <stdio.h>
  18. #include <ctype.h>
  19. #include <sys/param.h>
  20. #include <sys/file.h>
  21. #include <sys/time.h>
  22. #include <sys/types.h>
  23. #include <sys/timeb.h>
  24. #include <sys/dir.h>
  25. #include <sys/stat.h>
  26. #include <sys/wait.h>
  27. #include <strings.h>
  28.  
  29. extern char *strtok();
  30. #define    strchr    index
  31.  
  32. #define STATUS union wait
  33. #define postmaster "postmaster"
  34. #define EXIT_OK 0
  35. #define EXIT_ERR 1
  36.  
  37. #define    UNIX
  38. #define EXEDIR  "/usr/lib/uucp" /* uuxqt executables live here */
  39. #define NULL_DEVICE "/dev/null"
  40. #define    NAMESIZE    MAXPATHLEN
  41. #endif
  42.  
  43. #ifdef SYSV
  44. /* Unix System V */
  45. #include <stdio.h>
  46. #include <ctype.h>
  47. #include <fcntl.h>
  48. #include <string.h>
  49. #include <sys/types.h>
  50. #include <sys/timeb.h>
  51. #include <sys/stat.h>
  52. #include <sys/dirent.h>
  53.  
  54. #define    UNIX
  55. #endif
  56.  
  57. #ifdef UNIX
  58. /* Stuff common to all Unix systems */
  59. #define    remove    unlink    /* Unix-ism for removing a file */
  60. #define    BUFFEREDIO
  61. #define    MULTITASK
  62. #define    STDIN        0
  63. #define    O_BINARY    0    /* No distinction between text and binary */
  64. #endif
  65.  
  66. #ifdef CPM
  67. /* CP/M-80 */
  68. #include <stdio.h>
  69. #include <ctype.h>
  70. #include <fcntl.h>
  71.  
  72. #define    NAMESIZE    50        /* No directories... */
  73. #endif
  74.  
  75. #ifdef MSDOS
  76. /* Microsoft DOS */
  77. #include <stdio.h>
  78. #include <ctype.h>
  79. #include <fcntl.h>
  80. #include <time.h>
  81. #include <signal.h>
  82. #include <dos.h>
  83. #include <conio.h>
  84. #include <stdlib.h>
  85. #include <process.h>
  86. #include <string.h>
  87. #include <direct.h>
  88. #include <memory.h>
  89.  
  90. /* Turn on support for the interrupt driven comm port routines */
  91. #define    COMPORT
  92.  
  93. #ifdef COMPORT
  94. #define    BUFFEREDIO
  95. #include "comport.h"
  96. int handler();
  97. #endif
  98.  
  99. /* FIXME, these should all be uppercase. */
  100. #define    fnamesize    sizeof("FILENAME")    /* 8 chars */
  101. #define    NAMESIZE    128        /* full path size */
  102. #define    ufnamesize      5               /* uux id size */
  103. #endif
  104.  
  105. #ifdef ST
  106. /* Atari ST */
  107. #include <stdio.h>
  108. #include <ctype.h>
  109. #include <osbind.h>
  110. #include <signal.h>
  111. #include <setjmp.h>
  112.  
  113. #define O_RDONLY    0    /* for read only open() */
  114. #define NAMESIZE    13    /* filename size */
  115.  
  116. #endif
  117.  
  118. #ifdef VMS
  119.  
  120. #include <ctype.h>
  121. #include <dcdef.h>
  122. #include <descrip.h>
  123. #include <dvidef.h>
  124. #include <errno.h>
  125. #include <file.h>
  126. #include <file>
  127. #include <iodef.h>
  128. #include <math.h>
  129. #include <rmsdef.h>
  130. #include <setjmp.h>
  131. #include <signal.h>
  132. #include <ssdef.h>
  133. #include <stat.h>
  134. #include <stdlib.h>
  135. #include <stdio.h>
  136. #include <time.h>
  137. #include <tt2def.h>
  138. #include <ttdef.h>
  139. #include <string.h>
  140.  
  141. #define NAMESIZE 255
  142. #define CONTROL         "user2:[uucp.gnuucp]gnuucp.ctl"
  143. #define    LOGCLOSE    /* Logfile must be closed; VMS locks it when open */
  144. #define EXEDIR  "user2:[uucp.gnuucp]"  /* uuxqt executables live here */
  145. #define NULL_DEVICE "NL:"
  146. #define fork vfork
  147. #define STATUS int
  148. #define postmaster "system"
  149. #define EXIT_OK 1
  150. #define EXIT_ERR 0
  151.  
  152. #define    time_t    unsigned
  153. #define index strchr
  154. #define rindex strrchr
  155. #define remove delete    /* Remove a file */
  156. #define qsort pqsort    /* Our own version */
  157.  
  158. #endif
  159.  
  160. #ifdef MAC
  161. /* Macintosh */
  162. #include <FileMgr.h>
  163. #include <SerialDvr.h>
  164. #include <HFS.h>
  165. #include <MenuMgr.h>
  166. #include <signal.h>
  167. #include <IntlPkg.h>
  168. #include <MacTypes.h>
  169. #include <OsUtil.h>
  170. #include <EventMgr.h>
  171. #include <WindowMgr.h>
  172. #include <stdio.h>
  173. #include <console.h>
  174. #include <ctype.h>
  175. #include <setjmp.h>
  176. #include <stdlib.h>
  177. #include <string.h>
  178. #include <time.h>
  179. #include <unix.h>
  180. #include <errno.h>
  181. #include <fcntl.h>
  182. /* #include <io.h> */
  183. #define postmaster "postmaster"
  184. #define NULL_DEVICE ":NULL"
  185. #define off_t long
  186. #define time_t long
  187. #define EXIT_OK 1
  188. #define EXIT_ERR 0
  189. struct STATUS 
  190.     { 
  191.         long w_status;
  192.         };
  193.  
  194. struct stat 
  195.     {
  196.         long st_size;
  197.         long st_mtime;
  198.         };
  199. struct DIR
  200.     {
  201.         long dirinfo;
  202.         };
  203. struct dirent
  204.     {
  205.         char *d_name;
  206.         };
  207.         
  208. #define    NAMESIZE    255        /* No directories... */
  209. #include "gnuucp_proto.h"
  210. #include "rmail_proto.h"
  211. #include "sysdep.h"
  212. #endif
  213.  
  214.  
  215. #ifdef MAC_MPW
  216. /* Macintosh Programmers Workshop. */
  217. #include <stdio.h>
  218. #include <ctype.h>
  219. #include <fcntl.h>
  220. #include <setjmp.h>
  221. #include <uumac_mpw.h>
  222.  
  223. #define NAMESIZE 512 /* Hat. */
  224.  
  225. #define    abort()    exit(1);
  226. #endif
  227.  
  228. #ifdef AMIGA
  229. #include <stdio.h>
  230. #include <ctype.h>
  231. #include <fcntl.h>
  232. #include <exec/types.h>
  233. #include <exec/exec.h>
  234. #include <devices/serial.h>
  235. #include <devices/keymap.h>
  236. #include <devices/timer.h>
  237. #include <libraries/dos.h>
  238. #include <signal.h>
  239.  
  240. #define NAMESIZE 50
  241.  
  242. #define    bzero(area, len)    memset(area, '\0', len)
  243. #define    bcopy(from, to, len)    memcpy(to, from, len)
  244. #endif
  245.